import { IPublicTypeComponentMetadata, IPublicTypeSnippet } from '@alilc/lowcode-types';

const HorizontalTabsMeta: IPublicTypeComponentMetadata = {
  "componentName": "HorizontalTabs",
  "title": "横向标签页",
  "docUrl": "",
  "group": "通用组件",
  "screenshot": "",
  "devMode": "proCode",
  "npm": {
    "package": "hzdz-charts",
    "version": "0.1.0",
    "exportName": "HorizontalTabs",
    "main": "src/index.tsx",
    "destructuring": true,
    "subName": ""
  },
  "configure": {
    "props": [
      {
        "title": {
          "label": {
            "type": "i18n",
            "en-US": "tabs",
            "zh-CN": "标签页数据"
          }
        },
        "name": "tabs",
        "setter": {
          "componentName": "JsonSetter",
          "isRequired": false,
          "initialValue": [
            { 
              "key": "1", 
              "title": "综合压力表", 
              "content": "综合压力表内容",
              "icon": "https://lanhu-oss-2537-2.lanhuapp.com/SketchPnge7ca53bd07d228d254f7c9b0a3f82ffbb40ab24e0ec7b818f0dde38c559064d8"
            },
            { 
              "key": "2", 
              "title": "舆情风向标", 
              "content": "舆情风向标内容",
              "icon": "https://lanhu-oss-2537-2.lanhuapp.com/SketchPng35491b61da9ede2a0824b041c157090275cd90ae715403e84a08ae0f3723146f"
            },
            { 
              "key": "3", 
              "title": "改革助力窗", 
              "content": "改革助力窗内容",
              "icon": "https://lanhu-oss-2537-2.lanhuapp.com/SketchPng5164c9923f6e1d89bd797030f8304aca736ce37f3027c8d1cc9750ac480ada94"
            },
            { 
              "key": "4", 
              "title": "告警中心", 
              "content": "告警中心内容",
              "icon": "https://lanhu-oss-2537-2.lanhuapp.com/SketchPnge9eb21e8b2d096e398185fa942668addafa7bbbb2bd76a0f8a2642a2d7379537"
            }
          ]
        }
      },
      {
        "title": {
          "label": {
            "type": "i18n",
            "en-US": "defaultActiveKey",
            "zh-CN": "默认激活标签"
          }
        },
        "name": "defaultActiveKey",
        "setter": {
          "componentName": "StringSetter",
          "isRequired": false,
          "initialValue": "1"
        }
      },
      {
        "title": {
          "label": {
            "type": "i18n",
            "en-US": "size",
            "zh-CN": "尺寸"
          }
        },
        "name": "size",
        "setter": {
          "componentName": "SelectSetter",
          "props": {
            "options": [
              { "title": "小", "value": "small" },
              { "title": "中", "value": "medium" },
              { "title": "大", "value": "large" }
            ]
          },
          "isRequired": false,
          "initialValue": "medium"
        }
      },
      {
        "title": {
          "label": {
            "type": "i18n",
            "en-US": "showContent",
            "zh-CN": "显示内容"
          }
        },
        "name": "showContent",
        "setter": {
          "componentName": "BoolSetter",
          "isRequired": false,
          "initialValue": true
        }
      },
      {
        "title": {
          "label": {
            "type": "i18n",
            "en-US": "theme",
            "zh-CN": "主题样式"
          }
        },
        "name": "theme",
        "setter": {
          "componentName": "SelectSetter",
          "props": {
            "options": [
              { "title": "浅色", "value": "light" },
              { "title": "深色", "value": "dark" },
              { "title": "自定义（首页样式）", "value": "custom" }
            ]
          },
          "isRequired": false,
          "initialValue": "custom"
        }
      }
    ],
    "supports": {
      "style": true
    },
    "component": {}
  }
};

const snippets: IPublicTypeSnippet[] = [
  {
    "title": "横向标签页",
    "screenshot": "",
    "schema": {
      "componentName": "HorizontalTabs",
      "props": {
        "tabs": [
          { 
            "key": "1", 
            "title": "综合压力表", 
            "content": "综合压力表内容",
            "icon": "https://lanhu-oss-2537-2.lanhuapp.com/SketchPnge7ca53bd07d228d254f7c9b0a3f82ffbb40ab24e0ec7b818f0dde38c559064d8"
          },
          { 
            "key": "2", 
            "title": "舆情风向标", 
            "content": "舆情风向标内容",
            "icon": "https://lanhu-oss-2537-2.lanhuapp.com/SketchPng35491b61da9ede2a0824b041c157090275cd90ae715403e84a08ae0f3723146f"
          },
          { 
            "key": "3", 
            "title": "改革助力窗", 
            "content": "改革助力窗内容",
            "icon": "https://lanhu-oss-2537-2.lanhuapp.com/SketchPng5164c9923f6e1d89bd797030f8304aca736ce37f3027c8d1cc9750ac480ada94"
          },
          { 
            "key": "4", 
            "title": "告警中心", 
            "content": "告警中心内容",
            "icon": "https://lanhu-oss-2537-2.lanhuapp.com/SketchPnge9eb21e8b2d096e398185fa942668addafa7bbbb2bd76a0f8a2642a2d7379537"
          }
        ],
        "defaultActiveKey": "1",
        "size": "medium",
        "showContent": false,
        "theme": "custom"
      }
    }
  }
];

export default {
  ...HorizontalTabsMeta,
  snippets
};
